﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

/// <summary>
///  Namespace: Zy.WPF.CtrLib.Converts
///  Name： VisibleToReverse
///  Author: zy
///  Time:  2022-04-10 08:56:40
///  Version:  0.1
/// </summary>

namespace Zy.WPF.CtrLib.Converts
{
    /// <summary>
    /// 可见反转
    /// </summary>
    public class VisibleToReverse : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if ((Visibility)value == Visibility.Visible)
                return Visibility.Collapsed;
            else
                return Visibility.Visible;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
